<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="commons/taglibs.jsp" %>
<!DOCTYPE html>
<!-- saved from url=(0026)http://sell.fqapps.com/reg -->
<html class="js cssanimations"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title>激活续费-一折微信淘客系统</title>

    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/amazeui.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/admin.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/style.css">

    <!--[if (gte IE 9)|!(IE)]><!-->
    <script type="text/javascript" src="${ctx}/assets/js/jquery.min.js"></script>
    <script type="text/javascript" src="${ctx}/assets/js/fastclick.min.js"></script>
    <script>$(function() {FastClick.attach(document.body);});</script>
    <!--<![endif]-->

    <script type="text/javascript" src="${ctx}/assets/js/amazeui.min.js"></script>
</head>

<body>
<%@ include file="commons/dialog.jsp" %>
<jsp:include page="commons/head.jsp" flush="true" />
<script>

$(function() {

	//提交
	$('#submit').on('click', function() {
		
		if($("#final_cash").text() == '待选择'){
			$("#coupon").val("0");
			$("#fq_alert_info").html("请先选择开通版本和时长！");
			$('#fq_alert').modal({closeViaDimmer:false});
			return;
		}
		$(this).attr('disabled',true);
		var choose_version = $('input[name="choose_version"]:checked').val();
		var key =  $("#key").children('option:selected').val(); 
		var coupon =  $("#coupon").children('option:selected').val(); 
		active(choose_version,key,coupon);
	

	});
	
	//通用激活
	function active(choose_version,key,coupon){
		$.ajax({
			type:'post',
			url:"/Active/index.html",
			data:{'choose_version':choose_version,'key':key,'coupon':coupon},
			success:function(data){
				if(data.status == 1){
				
					$("#fq_confirm_info").text(data.info);
					$('#fq_confirm').modal({closeViaDimmer:false,relatedTarget: this,onConfirm: function(options) {
							window.location.reload();
						},onCancel: function() {}
					});

				}else{
					$('#submit').attr('disabled',false);
					$("#fq_alert_info").html(data.info);
					$('#fq_alert').modal({closeViaDimmer:false});
						
				}
			}
		});
	}
  

	//激活码激活
	$('#usecode').on('click', function() {
					
		$("#codevalue").val('');
		
		$('#code_modal').modal({
			relatedTarget: this,
			onConfirm: function(e) {
			
			$.ajax({
				type:'post',
				url:"/active/api_active_keycode.html",
				data:{'keycode':e.data},
				success:function(data){
					if(data.status == 1){
				
						$("#fq_confirm_info").text(data.info);
						$('#fq_confirm').modal({closeViaDimmer:false,relatedTarget: this,onConfirm: function(options) {
								window.location.href="/"; 
							},onCancel: function() {}
						});

					}else{
				
						$("#fq_alert_info").html(data.info);
						$('#fq_alert').modal({closeViaDimmer:false});
						
					}
				}
			});
			
		},
		onCancel: function(e) {}
		});
	});
	
	//版本选择
	$('input:radio[name="choose_version"]').change(function() { 
		$("#key").val("0");
		$("#coupon").val("0");
		$("#final_expire").text("待选择");
		$("#final_cash").text("待选择");
		$("#final_version").text($('input:radio[name="choose_version"]:checked').data("name"));
		
		$.ajax({
				type:'post',
				url:"/active/api_price_info.html",
				data:{'choose_version':$('input:radio[name="choose_version"]:checked').val()},
				success:function(data){
					if(data.status == 1){
						var $key = $("#key");
						$key.empty(); 
						$key.append('<option value="0">请选择开通/续费时长</option>');
						for (var i in data.price) {
							//console.log(data.price[i]);
							$key.append('<option value="'+data.price[i].key+'">'+data.price[i].name+'/'+data.price[i].cash+'元</option>');
						}
					}else{
				
						$("#fq_alert_info").html(data.info);
						$('#fq_alert').modal({closeViaDimmer:false});
						
					}
				}
			});
	
	}); 
	
	//时间选择
	$('#key').change(function(){ 
		
		var choose_version = $('input:radio[name="choose_version"]:checked').val();
		var key =  $(this).children('option:selected').val(); 
		
		if(choose_version == undefined || key == 0){
			$("#key").val("0");
			$("#fq_alert_info").html("请先选择开通版本！");
			$('#fq_alert').modal({closeViaDimmer:false});
			return;
		}
	
		
		$.ajax({
			type:'post',
			url:"/active/api_get_final_price.html",
			data:{'choose_version':choose_version,'key':key},
			success:function(data){
				if(data.status == 1){
					$("#final_expire").text(new Date((data.final_expire+8*3600) * 1000).toISOString().substr(0,10));
					$("#final_cash").text(data.final_cash);
				}else{
					$("#key").val("0");
					$("#fq_alert_info").html(data.info);
					$('#fq_alert').modal({closeViaDimmer:false});
						
				}
			}
		});
	
		
	}); 
	
	//优惠券选择
	$('#coupon').change(function(){
		if($("#final_cash").text() == '待选择'){
			$("#coupon").val("0");
			$("#fq_alert_info").html("请先选择开通版本和时长！");
			$('#fq_alert').modal({closeViaDimmer:false});
			return;
		}
		var coupon_money = $(this).children('option:selected').data("coupon_money");
		var final_cash = $("#final_cash").text();
		if(final_cash > coupon_money){
			$("#final_cash").text(final_cash-coupon_money);
		}else{
			$("#coupon").val("0");
			$("#fq_alert_info").html("优惠券金额大于支付金额！");
			$('#fq_alert').modal({closeViaDimmer:false});
		}
	}); 
	
	
	//获得内测优惠券
	$('#getcoupon').on('click', function() {
		
		$.ajax({
			type:'get',
			url:"/active/api_get_beta_coupon.html",
			success:function(data){
			
				if(data.status == 1){
				
					$("#fq_confirm_info").text(data.info);
					$('#fq_confirm').modal({closeViaDimmer:false,relatedTarget: this,onConfirm: function(options) {
							location.reload();
						},onCancel: function() {}
					});

				}else{
				
					$("#fq_alert_info").html(data.info);
					$('#fq_alert').modal({closeViaDimmer:false});
						
				}
			}
		});

		
	});

	
});


</script>
	
<div class="am-modal am-modal-prompt" tabindex="-1" id="code_modal">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">输入激活码</div>
    <div class="am-modal-bd">
      <input type="text" id="codevalue" class="am-modal-prompt-input">
    </div>
    <div class="am-modal-footer">
	    <span class="am-modal-btn" data-am-modal-confirm="">提交</span>
      <span class="am-modal-btn" data-am-modal-cancel="">取消</span>
    </div>
  </div>
</div>
	
	
<div class="am-cf admin-main">

<div class="am-modal am-modal-alert" tabindex="-1" id="to_be_continued">
  <div class="am-modal-dialog">
    <div class="am-modal-hd" id="fq_alert_title"></div>
    <div class="am-modal-bd" id="fq_alert_info">即将上线！</div>
    <div class="am-modal-footer">
      <span class="am-modal-btn">朕知道了</span>
    </div>
  </div>
</div>


<!-- sidebar start -->
  <jsp:include page="commons/left.jsp" flush="true" />
<!-- sidebar end -->  

<!-- content start -->
<div class="admin-content"><div class="admin-content-body">
	
	<div class="am-margin-top-sm am-margin-left">
		<strong class="am-text-primary am-text-lg">激活续费</strong> / <small>Activation</small>
	</div>
	
<div class="am-margin">
	
<div class="" style="margin-top: -8px;">
		
<table class="am-table am-text-xs am-table-bordered am-text-center">
    <thead>
        <tr>
            <th class="am-text-center">功能</th>
            <th class="am-text-center">基础版</th>
            <th class="am-text-center">专业版</th>
            <th class="am-text-center">是否需要认证服务号支持</th>
            <th class="am-text-center">功能详解</th>
        </tr>
    </thead>
   <tbody>
        <tr>
            <td>商品数量限制</td>
            <td class="am-success">300个</td>
            <td class="am-success">2000个</td>
            <td class="am-danger">否</td>
            <td>发布的总数量上限数量，过期的删除可以发新的</td>
        </tr>
        <tr>
            <td>智能发布商品</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>后台根据淘客链接、优惠券自动填充商品信息</td>
        </tr>
        <tr>
            <td>商品编辑管理</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>随时可以编辑商品、下架删除商品</td>
        </tr>
        <tr>
            <td>商品推广分享</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>一键获取商品推广文案以及短链接用于微信分享</td>
        </tr>
        <tr>
            <td>淘客商品单个转链发布软件</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>使用软件单个把商品转换高佣金发布到平台</td>
        </tr>
        <tr>
            <td>淘客商品批量转链发布软件</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>使用软件批量把商品转换高佣金发布到平台</td>
        </tr>
        <tr>
            <td>优质产品库</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>爬取全网商品进行分析，筛选优质产品</td>
        </tr>
        <tr>
            <td>访问数据统计</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>可以加入CNZZ统计代码，统计页面每天访问数据</td>
        </tr>
        <tr>
            <td>自定义三级域名</td>
            <td class="am-success">有</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>自定义自己的三级域名</td>
        </tr>
        <tr>
            <td>用户裂变模块</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>结合二维码海报进行用户裂变</td>
        </tr>
        <tr>
            <td>积分系统</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>用户积分系统，刺激用户做任务裂变</td>
        </tr>
        <tr>
            <td>兑换商城</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>积分兑换商城，可自定义兑换商品消耗的积分</td>
        </tr>
        <tr>
            <td>精准用户推送商品</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>可以给指定的用户精准推送商品信息</td>
        </tr>
        <tr>
            <td>用户晒单系统</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>用户可以自主晒单，淘客也可以直接在后台自行晒单</td>
        </tr>
        <tr>
            <td>会员系统</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>会员的各项数据，都可以查看到</td>
        </tr>
        <tr>
            <td>粉丝维度模块</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-warning">必须</td>
            <td>判断一个粉丝的贡献的价值，适当维护</td>
        </tr>

<tr>
            <td>专题图片轮播</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>自定义首页轮播专题图片</td>
        </tr>
		


<tr>
            <td>微信群机器人</td>
            <td class="am-danger">无</td>
            <td class="am-success">有</td>
            <td class="am-danger">否</td>
            <td>自动发送入群欢迎、统计邀请人数、指定踢人等功能</td>
        </tr><tr>
            <td>商品顺序打乱</td>
            <td class="am-danger">无</td>
            <td class="am-danger">无</td>
            <td class="am-danger">否</td>
            <td>用户进来都是随机的商品展示，更多曝光机会形成更多成交</td>
        </tr><tr>
            <td>积分抽奖</td>
            <td class="am-danger">无</td>
            <td class="am-danger">无</td>
            <td class="am-warning">必须</td>
            <td>自定义抽奖，互动你的粉丝</td>
        </tr>

<tr>
            <td>自定义海报</td>
            <td class="am-danger">无</td>
            <td class="am-danger">无</td>
            <td class="am-warning">必须</td>
            <td>可以上传自定义推广海报宣传封面底图</td>
        </tr><tr>
            <td>渠道码推广</td>
            <td class="am-danger">无</td>
            <td class="am-danger">无</td>
            <td class="am-warning">必须</td>
            <td>生成不同渠道的二维码，用于统计不同渠道推广数据</td>
        </tr>
        <tr>
            <td>更多高级功能</td>
            <td class="am-danger">无</td>
            <td class="am-warning">不一定</td>
            <td class="am-warning">不一定</td>
            <td>后续还会有更多的高级功能推出</td>
        </tr>
    
    </tbody>
</table>
		
</div>
	
		
		<div class="am-badge">
			当前版本：未激活（到期时间：永不过期）
		</div>
		<div><a href="" class="am-badge am-badge-success">您的可用余额：0.00元 </a></div>
	
		
		<legend class="am-text-sm am-margin-top-sm am-margin-bottom-0 am-text-danger" style="width: 300px;"><strong>版本选择：</strong></legend>
		
		<label class="am-radio am-secondary">
			<input type="radio" name="choose_version" value="1" data-name="基础版" data-am-ucheck="" class="am-ucheck-radio"><span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i class="am-icon-checked"></i></span> 
			基础版			</label><label class="am-radio am-secondary">
			<input type="radio" name="choose_version" value="2" data-name="专业版" data-am-ucheck="" class="am-ucheck-radio"><span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i class="am-icon-checked"></i></span> 
			专业版			</label>		
		<legend class="am-text-sm am-margin-bottom-xs am-text-danger" style="width: 300px;"><strong>时间选择：</strong></legend>
		
		<div class="am-form-group am-text-sm">
			<select id="key">
				<option value="0">请选择开通/续费时长</option>
			</select>
		</div>
		
		<legend class="am-text-sm am-margin-top-sm am-margin-bottom-xs am-text-danger" style="width: 300px;"><strong>可用优惠券：</strong></legend>
		
		<div>
                      <button id="getcoupon" class="am-btn am-btn-primary am-btn-xs">内测用户点击获取专享优惠</button>
  		</div>
		
		<div class="am-form-group am-text-sm am-margin-top-sm">
			<select id="coupon">
				<option value="0">请选择优惠券</option>
							</select>
		</div>
		
		
		<div class="am-text-sm">
			<div><strong>最终版本</strong>：<span id="final_version">待选择</span></div>
			<div><strong>到期时间</strong>：<span id="final_expire">待选择</span></div>
			<div><strong>支付金额</strong>：<span id="final_cash">待选择</span></div>
		</div>
	
		
		<div class="am-margin am-margin-left-0">
			<button id="submit" class="am-btn am-btn-warning">立即激活</button>
			<!-- <button id="usecode" class="am-btn am-btn-primary">使用激活码</button> -->
		</div>
		
		

		
	</div>
	
	
</div><footer class="admin-content-footer">
	<hr>
	<p class="am-padding-left">深圳前海刷云科技有限公司  CopyRight©2016  闽ICP备16026055号</p>
</footer></div>
<!-- content end -->
	
</div>




</body></html>